using System;
using System.Collections.Generic;
using System.Text;

namespace LoggingServer
{
    public static class StaticComponent
    {
        public static string Path = "C:\\LittleATM";
        public static string PathLog = "C:\\LittleATM\\Log";
        public static string PathLogFile = "C:\\LittleATM\\Log\\Log.log";

        private static bool logExBool = true;
        public static bool LogExBool
        {
            get
            {
                return logExBool;
            }

            set
            {
                logExBool = value;
            }
        }

        public static void LogStr(string e)
        {
            Console.WriteLine(e);
        }

        public static void LogEx(Exception e)
        {
            LogEx(e, logExBool);
        }


        public static void LogEx(Exception e, bool write)
        {
            if (write)
            {
                Console.WriteLine("");
                Console.WriteLine("================ Install Failed ================");
                Console.WriteLine("[Message] - " + e.Message);
                Console.WriteLine("[StackTrace] - " + e.StackTrace);
                Console.WriteLine("================================================");
                Console.WriteLine("");
            }
        }
    }
}
